<?php use_stylesheet('../sfDoctrinePlugin/css/default.css') ?>
<div id="sf_admin_container">
<h1>Reviews List</h1>

<table>
  <thead>
    <tr>
      <th>Id</th>
      <th>User profile</th>
      <th>Title</th>
      <th>Text</th>
      <th>Solution </th>
      <th>Created at</th>
      <th>Updated at</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($reviews as $review): ?>
    <tr>
      <td><?php echo $review->getId() ?></td>
      <td><?php echo $review->getUserProfileId() ?></td>
      <td><?php echo $review->getTitle() ?></td>
      <td><?php echo $review->getText() ?></td>
      <td><?php echo $review->getSolutionId() ?></td>
      <td><?php echo $review->getCreatedAt() ?></td>
      <td><?php echo $review->getUpdatedAt() ?></td>
      <td> 
              <ul class="sf_admin_td_actions">
    <li class="sf_admin_action_edit"><a href="<?php echo url_for('review/edit?id='.$review->getId()) ?>">Edit</a></li>    
    <li class="sf_admin_action_delete"><?php echo link_to('Delete', 'review/delete?id='.$review->getId(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?></li>  </ul>
     </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
    <?php if (isset($solution_id)): ?>
<ul class="sf_admin_actions">
<li class="sf_admin_action_new">
  <a href="<?php echo url_for(array('module'=>'review','action'=>'new', 'solution_id' => $solution_id)) ?>">Create new</a>
</li></ul>
<?php endif; ?>
</div>